# Contributor: Thomas Kienlen <kommander@laposte.net>
# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=ri-li
pkgver=2.0.1
pkgrel=1
pkgdesc="Drive a toy wood engine in many levels and collect all the coaches to win"
url="https://ri-li.sourceforge.net"
arch="x86 x86_64"
license="GPL-3.0-or-later"
makedepends="sdl12-compat-dev sdl_mixer-dev"
source="$pkgname-$pkgver.tar.bz2::https://download.sourceforge.net/sourceforge/ri-li/Ri-li-$pkgver.tar.bz2
	iostream.patch
	pointers.patch
	ri-li.desktop
	"
options="!check" # No test suite
builddir="$srcdir/Ri-li-$pkgver"

build() {
	./configure --prefix=/usr
	sed -i "s/SUBDIRS = src data Sounds gentoo/SUBDIRS = src data Sounds/" Makefile
	make
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm 644 "$srcdir"/ri-li.desktop "$pkgdir"/usr/share/applications/ri-li.desktop
	install -Dm 644 "$builddir"/data/Ri-li-icon-48x48.png "$pkgdir"/usr/share/pixmaps/ri-li.png
}

sha512sums="
6d56c00dae90b50bca81ca739c628335b4ad7642c19a3b3c28630ddb91bd847ca6d383cace66ef436a1dda7497c9d3939de2626071bae40d423b2444fed97863  ri-li-2.0.1.tar.bz2
49fbf3a30f0ae6c47d8fcc45d72891ac199187f7615840f6eb994df998440980d7838beceec5225325c2e971c97dbc28a02ad47db03d144bb9cd90b18d4422e8  iostream.patch
e2e820cb5d09cc3b9a0318acbd24755d09db259ce52da8b833d7a6957f92a877e4a74b6393b053d5d5e6863a60352a5ac0a915bc8203759c5a7d69346320e6ac  pointers.patch
cba2c93be02ad90ffda4fd637df347f3a88d43548c61d60bf06050cac5e6d9d379b6232a86925049903dbf7eabf9355977e17c568042341e1091af358932393f  ri-li.desktop
"
